package org.keshe.controllers;


import javafx.application.Platform;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.Label;
import org.keshe.CurrentUser;
import org.keshe.gui.PublicStages;

import java.net.URL;
import java.util.ResourceBundle;

public class MasterMenu implements Initializable {

    @FXML
    public Label label;

    @FXML
    void abnormalBehvrClick(ActionEvent event) {
        PublicStages.ABNORMALINOUT.show();
    }

    @FXML
    void changePwdClick(ActionEvent event) {
        PublicStages.CHANGEPASSWD.show();
    }

    @FXML
    void exitClick(ActionEvent event) {
        Platform.exit();
    }

//    @FXML
//    void scoreDormClick(ActionEvent event) {
//
//    }

    @FXML
    void thisBuildingStuClick(ActionEvent event) {
        PublicStages.THISBUILDINGSTU.show();
    }

    @Override
    public void initialize(URL url, ResourceBundle resourceBundle) {
        label.setText("您好！宿管" + CurrentUser.USER.getUserName());
    }
}
